import os

in_path = "./dist/js/"

# out_path = "../dist/js_out"
out_path = "./dist/js"


if not os.path.exists(out_path):
    os.mkdir(out_path)


jsL = os.listdir(in_path)

for js in jsL:
    with open(f"{in_path}/{js}","r",encoding="utf-8") as fp:
        js_textL = fp.readlines()


    with open(f"{out_path}/{js}","w",encoding="utf-8-sig") as fp:
        fp.writelines(js_textL)